using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;

public class BasePanel : MonoBehaviour
{
    public string path;
    public GameObject panel;
    public PanelManager.Layer layer = PanelManager.Layer.Panel;
    public void Init()
    {
        var prefab = ResManager.LoadPrefab(path);   
        panel = Instantiate(prefab);
    }
    public void Close()
    {
        string name = GetType().ToString();
        PanelManager.Close(name);
    }
    public virtual void OnInit() { }
    public virtual void OnShow(params object[] para) { }
    public virtual void OnClose() { }
}
